import java.io.*;
import java.nio.charset.Charset;

public class FormatMyTxtFile {
    public static void main(String[] args) throws IOException {
        File inFile = new File("C:\\Users\\35326\\Desktop\\小鹤双拼\\6. 小鹤相关学习心得、使用心得\\五笔提速——祭.txt");
        File outFile = new File("C:\\Users\\35326\\Desktop\\小鹤双拼\\6. 小鹤相关学习心得、使用心得\\五笔提速——祭(修改格式后).txt");

        InputStreamReader inputStreamReader = new InputStreamReader(new FileInputStream(inFile), Charset.forName("GB2312"));
        OutputStreamWriter outputStreamWriter=new OutputStreamWriter(new FileOutputStream(outFile),Charset.forName("GB2312"));

        char[] buffer = new char[64];
        int len=-1;
        while((len=inputStreamReader.read(buffer))!=-1){
            outputStreamWriter.write(buffer,0,len);
            outputStreamWriter.write("\n");
        }

        inputStreamReader.close();
        outputStreamWriter.close();

    }
}
